<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>原型式继承</title>
</head>
<body>
<script>

  function beget(obj) {
   function F(){}
    F.prototype = obj;
    return new F();
  }

  function Super(val,arr) {
    this.val = val;
    this.arr = arr;
  }

  var sup = new Super(1,[1]);
  var sub = beget(sup)

</script>
</body>
</html>